package com.ruoyi.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.business.domain.AlarmInfo;
import com.ruoyi.business.mapper.AlarmInfoMapper;
import com.ruoyi.business.service.IAlarmInfoService;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.List;

/**
 * 系统警报信息Service实现类
 *
 * @author qiancheng
 * @date 2025-09-02
 */
@Service
public class AlarmInfoServiceImpl extends ServiceImpl<AlarmInfoMapper, AlarmInfo> implements IAlarmInfoService {

    /**
     * 查询警报列表（支持时间范围）
     * @param alarmInfo 查询条件
     * @return 警报列表
     */
    @Override
    public List<AlarmInfo> selectAlarmListByTimeRange(AlarmInfo alarmInfo) {
        //alarmInfo.setBelongYear(LocalDate.now().getYear());

        return baseMapper.selectAlarmListByTimeRange(alarmInfo);
    }

}